home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / misc / xref_v1.1.lha / XRef / Tools / lib / checksuffix.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-05  |  497 b   |  31 lines

  1. /*
  2. ** $PROJECT: xrefsupport.lib
  3. **
  4. ** $VER: checksuffix.c 1.1 (04.09.94)
  5. **
  6. ** by
  7. **
  8. ** Stefan Ruppert , Windthorststraße 5 , 65439 Flörsheim , GERMANY
  9. **
  10. ** (C) Copyright 1994
  11. ** All Rights Reserved !
  12. **
  13. ** $HISTORY:
  14. **
  15. ** 04.09.94 : 001.001 :  initial
  16. */
  17.  
  18. #include "/source/Def.h"
  19.  
  20. BOOL checksuffix(STRPTR file,STRPTR suffix)
  21. {
  22.    ULONG suflen = strlen(suffix);
  23.    ULONG len    = strlen(file);
  24.  
  25.    if(len > suflen && !Stricmp(&file[len-suflen],suffix))
  26.       return(TRUE);
  27.  
  28.    return(FALSE);
  29. }
  30.  
  31.